<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>渲染赠品案例</title>
</head>
<body>
   <div></div>
  <script>
     const gift="50g的茶叶，清洗球"
     const giftArr=gift.split(",")
     const d=document.querySelector("div")
     console.log(giftArr);
     giftArr.map(function(item){
            const span=`<span>${item}</span>`
            d.innerHTML=span
     })
  </script>
</body>
</html>